﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ACP.DTO;

namespace ACP.Data
{
    public class UserRepository : Repository<user>
    {
        public static user getUserByeMail(string userEmail) {

            IRepository<user> userRepository = new Repository<user>();
            user usersEntity;
            try
            {
                usersEntity = userRepository.First(q => q.emailid == userEmail);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                userRepository.Dispose();
            }
            return usersEntity;
        }
    }
}
